return {
  "folke/which-key.nvim",
  event = "VeryLazy",
  -- init = function()
  --   vim.o.timeout = true
  --   vim.o.timeoutlen = 300
  -- end,
  opts = {
    -- your configuration comes here
    -- or leave it empty to use the default settings
    -- refer to the configuration section below
  },
  -- config = function()
  --   -- toggleable
  --   local toggle_term_vertical = function()
  --     require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 }
  --   end
  --   local toggle_term_horizon = function()
  --     require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 }
  --   end
  --   local toggle_term_float = function()
  --     require("nvchad.term").toggle { pos = "float", id = "floatTerm" }
  --   end
  --   -- blankline
  --   local jump_to_current_context = function()
  --     local config = { scope = {} }
  --     config.scope.exclude = { language = {}, node_type = {} }
  --     config.scope.include = { node_type = {} }
  --     local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config)
  --
  --     if node then
  --       local start_row, _, end_row, _ = node:range()
  --       if start_row ~= end_row then
  --         vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 })
  --         vim.api.nvim_feedkeys("_", "n", true)
  --       end
  --     end
  --   end
  --
  --   -- tabufline
  --   local tabufline = require "nvchad.tabufline"
  --   local buffer_next = tabufline.next
  --   local buffer_previous = tabufline.prev
  --   local buffer_close = tabufline.close_buffer
  --
  --   local file_format = function()
  --     require("conform").format { lsp_fallback = true }
  --     print "formatting"
  --   end
  --
  --   local gs = require "gitsigns"
  --   -- local neogit = require "neogit"
  --   local reload = function()
  --     require "mappings"
  --     require "plugins"
  --   end
  --
  --   local wk = require "which-key"
  --   wk.register({
  --     -- map("n", "<Esc>", "<cmd>noh<CR>", { desc = "General Clear highlights" })
  --     ["<Esc>"] = { "<cmd>noh<CR>", "General Clear highlights" },
  --     ["="] = { file_format, "format" },
  --     ["]"] = {
  --       name = "+next",
  --       b = { buffer_next, "buffer" },
  --     },
  --     ["["] = {
  --       name = "+previous",
  --       b = { buffer_previous, "buffer" },
  --     },
  --     ["<C-s>"] = { "<cmd>write<cr>", "save" },
  --     ["<C-x>"] = {
  --       name = "+quit",
  --       b = { buffer_close, "buffer" },
  --       q = { "ZZ", "nvim" },
  --     },
  --     -- Better window navigation
  --     ["<C-h>"] = { "<C-w>h", "Window left" },
  --     ["<C-l>"] = { "<C-w>l", "Window right" },
  --     ["<C-j>"] = { "<C-w>j", "Window down" },
  --     ["<C-k>"] = { "<C-w>k", "Window up" },
  --     ["<C-Up>"] = { ":resize -2<CR>", "Window resize up" },
  --     ["<C-Down>"] = { ":resize +2<CR>", "Window resize down" },
  --     ["<C-Left>"] = { ":vertical resize -2<CR>", "Window resize left" },
  --     ["<C-Right>"] = { ":vertical resize +2<CR>", "Window resize right" },
  --     ["<C-tab>"] = { buffer_next, "Buffer Goto next" },
  --     ["<S-tab>"] = { buffer_previous, "Buffer Goto prev" },
  --     -----------------
  --     -- Meta Key bindings --
  --     -----------------
  --     ["<A-b>"] = { "<cmd>Telescope buffers<cr>", "buffers" },
  --     ["<A-e>"] = { "<cmd>NvimTreeToggle<cr>", "nerdtree" },
  --     ["<A-f>"] = { "<cmd>Telescope find_files<cr>", "files" },
  --     ["<A-g>"] = { "<cmd>Neogit<cr>", "git" },
  --     ["<A-h>"] = { toggle_term_horizon, "terminal horizontal" },
  --     ["<A-i>"] = { toggle_term_float, "terminal float" },
  --     ["<A-j>"] = { "<cmd>CMakeGenerate<cr>", "generate" },
  --     ["<A-k>"] = { "<cmd>make test<cr>", "make" },
  --     ["<A-l>"] = { reload, "reload" },
  --     ["<A-m>"] = { "<cmd>Telescope marks<cr>", "marks" },
  --     ["<A-p>"] = { "<cmd>Telescope projects<cr>", "projects" },
  --     ["<A-q>"] = { buffer_close, "close" },
  --     ["<A-r>"] = { "<cmd>Telescope oldfiles<cr>", "recentf" },
  --     ["<A-s>"] = { "<cmd>Telescope live_grep<cr>", "search" },
  --     ["<A-t>"] = { "<cmd>Telescope<cr>", "telescope" },
  --     ["<A-v>"] = { toggle_term_vertical, "terminal vertical" },
  --     ["<A-w>"] = { "<cmd>w!<cr>", "write file" },
  --     ["<A-?>"] = { "<cmd>Telescope help_tags<cr>", "help" },
  --     ["<A-=>"] = { file_format, "format" },
  --     ["<A-.>"] = { "<cmd>chdir %:p:h<cr>", "chdir to current file" },
  --     ["<A-;>"] = {
  --       function()
  --         require("Comment.api").toggle.linewise.current()
  --       end,
  --       "comment",
  --     },
  --     -- Leader map
  --     ["<leader>"] = {
  --       b = {
  --         name = "+buffer",
  --         c = { "<cmd>enew<CR>", "Buffer New" },
  --         n = { buffer_next, "Buffer Goto next" },
  --         p = { buffer_previous, "Buffer Goto prev" },
  --         d = { buffer_close, "Buffer close" },
  --       },
  --       c = {
  --         name = "+code",
  --         c = { jump_to_current_context, "Blankline Jump to current context" },
  --       },
  --       d = {
  --         name = "+diagnostic",
  --         f = { vim.diagnostic.open_float, "Lsp floating diagnostics" },
  --         p = { vim.diagnostic.goto_prev, "Lsp prev diagnostic" },
  --         n = { vim.diagnostic.goto_next, "Lsp next diagnostic" },
  --         l = { vim.diagnostic.setloclist, "Lsp diagnostic loclist" },
  --       },
  --       e = {
  --         name = "+edit",
  --       },
  --       f = {
  --         name = "+file",
  --         b = { "<cmd>Telescope buffers<cr>", "Find Buffers" },
  --         d = { "<cmd>Telescope file_browser<cr>", "File Browser" },
  --         e = { "<cmd>NvimTreeFocus<CR>", "Nvimtree Focus window" },
  --         f = { "<cmd>Telescope find_files<cr>", "Find File" },
  --         g = { "<cmd>Telescope live_grep<CR>", "grep" },
  --         l = { "<cmd>Lazy<cr>", "Lazy" },
  --         m = { "<cmd>Mason<cr>", "Mason" },
  --         n = { "<cmd>enew<cr>", "New File" },
  --         p = { "<cmd>Telescope projects<cr>", "Project" },
  --         r = { "<cmd>Telescope oldfiles<cr>", "Open Recent Files" },
  --         s = { "<cmd>w!<cr>", "Save File" },
  --         t = { "<cmd>Telescope<cr>", "Telescope" },
  --         v = {
  --           name = "+vstask",
  --           a = {
  --             function()
  --               require("telescope").load_extension "vstask"
  --               require("telescope").extensions.vstask.tasks {}
  --             end,
  --             "tasks",
  --           },
  --           i = {
  --             function()
  --               require("telescope").load_extension "vstask"
  --               require("telescope").extensions.vstask.inputs {}
  --             end,
  --             "inputs",
  --           },
  --           h = {
  --             function()
  --               require("telescope").load_extension "vstask"
  --               require("telescope").extensions.vstask.history {}
  --             end,
  --             "history",
  --           },
  --           l = {
  --             function()
  --               require("telescope").load_extension "vstask"
  --               require("telescope").extensions.vstask.launch {}
  --             end,
  --             "launch",
  --           },
  --         },
  --         z = {
  --           name = "+fzf",
  --           f = { "<cmd>FzfLua files<cr>", "file" },
  --         },
  --         ["."] = { "<cmd>chdir %:p:h<cr>", "chdir to %:p:h" },
  --         ["="] = { file_format, "Format Files" },
  --       },
  --       g = {
  --         -- map('v', '<leader>hs', function() gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
  --         -- map('v', '<leader>hr', function() gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
  --         name = "+git",
  --         h = {
  --           name = "+hunk",
  --           s = { gs.stage_hunk, "stage" },
  --           r = { gs.reset_hunk, "reset" },
  --           S = { gs.stage_buffer, "stage buffer" },
  --           u = { gs.undo_stage_hunk, "undo stage" },
  --           R = { gs.reset_buffer, "reset buffer" },
  --           p = { gs.preview_hunk, "preview" },
  --           b = {
  --             function()
  --               gs.blame_line { full = true }
  --             end,
  --             "blame line",
  --           },
  --           d = { gs.diffthis, "diff this" },
  --           D = {
  --             function()
  --               gs.diffthis "~"
  --             end,
  --             "diff this ~",
  --           },
  --         },
  --         m = { "<cmd>Telescope git_commits<CR>", "commits" },
  --         s = { "<cmd>Neogit<cr>", "open" },
  --         S = { "<cmd>Telescope git_status<CR>", "status" },
  --       },
  --       h = {
  --         name = "+help",
  --         t = { "<cmd>Telescope help_tags<cr>", "Telescope help" },
  --       },
  --       l = {
  --         name = "+lsp",
  --       },
  --       k = {
  --         name = "+key",
  --         c = { "<cmd>NvCheatsheet<CR>", "Toggle NvCheatsheet" },
  --         -- -- whichkey
  --         -- map("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "Whichkey all keymaps" })
  --         K = { "<cmd>WhichKey <CR>", "Whichkey all keymaps" },
  --         --
  --         -- map("n", "<leader>wk", function()
  --         --     vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ")
  --         -- end, { desc = "Whichkey query lookup" })
  --         k = {
  --           function()
  --             vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ")
  --           end,
  --           "Whichkey query lookup",
  --         },
  --         r = {
  --           function()
  --             require "mappings"
  --             require "plugins"
  --           end,
  --           "Reload keymap",
  --         },
  --       },
  --       p = {
  --         name = "+project",
  --         b = { "<cmd>CMakeBuild<cr>", "build" },
  --         c = { "<cmd>CMakeGenerate<cr>", "generate" },
  --         p = {
  --           function()
  --             require("telescope").extensions.projects.projects {}
  --           end,
  --           "project picker",
  --         },
  --       },
  --       t = {
  --         name = "+toggle",
  --         b = { gs.toggle_current_line_blame, "blame" },
  --         c = {
  --           function()
  --             require("Comment.api").toggle.linewise(vim.fn.visualmode())
  --           end,
  --           "comment",
  --           mode = "v",
  --         },
  --         d = { gs.toggle_deleted, "git sign deleted" },
  --         e = { "<cmd>NvimTreeToggle<CR>", "Toggle NvimTree" },
  --         n = { "<cmd>set nu!<CR>", "Toggle Line number" },
  --         o = { "<cmd>Outline<CR>", "outline" },
  --         r = { "<cmd>set rnu!<CR>", "Toggle Relative number" },
  --         s = { "<cmd>Telescope themes<CR>", "Telescope Nvchad themes" },
  --         t = { "<cmd>NvimTreeToggle<CR>", "Nvimtree Toggle window" },
  --         [";"] = {
  --           function()
  --             require("Comment.api").toggle.linewise.current()
  --           end,
  --           "comment",
  --         },
  --       },
  --       w = {
  --         name = "+window",
  --       },
  --     },
  --   }, {
  --     mode = "n", -- NORMAL mode
  --     -- prefix: use "<leader>f" for example for mapping everything related to finding files
  --     -- the prefix is prepended to every mapping part of `mappings`
  --     prefix = "",
  --     buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
  --     silent = true, -- use `silent` when creating keymaps
  --     noremap = true, -- use `noremap` when creating keymaps
  --     nowait = false, -- use `nowait` when creating keymaps
  --     expr = false, -- use `expr` when creating keymaps
  --   })
  --
  --   -- wk.register({
  --   --   ["<Esc>"] = { "<C-\><C-n>", "escape" },
  --   -- }, { mode = "t" })
  -- end,
}
